<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Sync Scroll</title>
  <style>
      .body{
          width: 100vw;
          height: 100vh;
          background-color: #d9d9d9;
          overflow: hidden;
      }
  </style>
</head>
<body>

<div class="body">
</div>

<script>
  const projectDirectorLabelList = [
    {
      "id": 5655,
      "taskId": 27924,
      "actionTaskId": null,
      "milepostId": null,
      "projectId": 1302,
      "role": "项目总监",
      "pointTypeCode": "AHEAD_FINISH",
      "pointTypeName": "提前完成",
      "timeCountdownMark": null,
      "taskPoints": 7.5,
      "taskRectificationPoints": 0,
      "taskRectificationPointsTime": null,
      "labelStatus": "IN_PROCESS",
      "deductStatus": "是",
      "instanceId": null,
      "businessDate": "2024-06",
      "settlementView": "已结算",
      "createdBy": "系统管理人员",
      "createdById": 1,
      "createdTime": 1717171225000,
      "updateBy": "系统管理人员",
      "updateById": 1,
      "updateTime": "2024-06-03 18:00:31",
      "delFlag": false,
      "operateFlag": null,
      "actionTaskOnly": "null项目总监AHEAD_FINISH",
      "only": "27924项目总监AHEAD_FINISH"
    },
    {
      "id": 5656,
      "taskId": 27924,
      "actionTaskId": null,
      "milepostId": null,
      "projectId": 1302,
      "role": "项目总监",
      "pointTypeCode": "AHEAD_FINISH",
      "pointTypeName": "提前完成",
      "timeCountdownMark": null,
      "taskPoints": 7.5,
      "taskRectificationPoints": 0,
      "taskRectificationPointsTime": null,
      "labelStatus": "IN_PROCESS",
      "deductStatus": "是",
      "instanceId": null,
      "businessDate": "2024-06",
      "settlementView": "已结算",
      "createdBy": "系统管理人员",
      "createdById": 1,
      "createdTime": 1717171225000,
      "updateBy": "系统管理人员",
      "updateById": 1,
      "updateTime": "2024-06-03 18:00:31",
      "delFlag": false,
      "operateFlag": null,
      "actionTaskOnly": "null项目总监AHEAD_FINISH",
      "only": "27924项目总监AHEAD_FINISH"
    },
    {
      "id": 223,
      "taskId": 27924,
      "actionTaskId": null,
      "milepostId": null,
      "projectId": 1302,
      "role": "项目总监",
      "pointTypeCode": "AHEAD_FINISH",
      "pointTypeName": "提前完成",
      "timeCountdownMark": null,
      "taskPoints": 7.5,
      "taskRectificationPoints": 0,
      "taskRectificationPointsTime": null,
      "labelStatus": "IN_PROCESS",
      "deductStatus": "是",
      "instanceId": null,
      "businessDate": "2024-04",
      "settlementView": "未结算",
      "createdBy": "系统管理人员",
      "createdById": 1,
      "createdTime": 1712916003000,
      "updateBy": "系统管理人员",
      "updateById": 1,
      "updateTime": "2024-05-31 10:20:25",
      "delFlag": false,
      "operateFlag": null,
      "actionTaskOnly": "null项目总监AHEAD_FINISH",
      "only": "27924项目总监AHEAD_FINISH"
    },
    {
      "id": 224,
      "taskId": 27924,
      "actionTaskId": null,
      "milepostId": null,
      "projectId": 1302,
      "role": "项目总监",
      "pointTypeCode": "AHEAD_FINISH",
      "pointTypeName": "提前完成",
      "timeCountdownMark": null,
      "taskPoints": 7.5,
      "taskRectificationPoints": 0,
      "taskRectificationPointsTime": null,
      "labelStatus": "IN_PROCESS",
      "deductStatus": "是",
      "instanceId": null,
      "businessDate": "2024-04",
      "settlementView": "未结算",
      "createdBy": "系统管理人员",
      "createdById": 1,
      "createdTime": 1712916003000,
      "updateBy": "系统管理人员",
      "updateById": 1,
      "updateTime": "2024-05-31 10:20:25",
      "delFlag": false,
      "operateFlag": null,
      "actionTaskOnly": "null项目总监AHEAD_FINISH",
      "only": "27924项目总监AHEAD_FINISH"
    }
  ];

  const groupedByBusinessDate = projectDirectorLabelList.reduce((acc, item) => {
    const month = item.businessDate;
    if (!acc[month]) {
      acc[month] = {
        month: month,
        data: []
      };
    }
    acc[month].data.push(item);
    return acc;
  }, {});

  const result = Object.values(groupedByBusinessDate);

  console.log(result);

</script>

</body>
</html>
